home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 16 / FrameDemo.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  804 b   |  23 lines

  1. /* <applet code = "FrameDemo" width=200 height=200>
  2.    </applet>
  3. */ 
  4. import java.awt.*;
  5. import java.applet.*;
  6. public class FrameDemo extends Applet { 
  7. public void init() {
  8. int width = Integer.parseInt(getParameter("width"));
  9. int height = Integer.parseInt(getParameter("height"));
  10. String val = "There are two ways of constructing " +
  11.              "a software design.\n" +
  12.              "One way is to make it so simple\n" +
  13.              "that there are obviously no deficiencies.\n" +
  14.              "And the other way is to make it so complicated" +
  15.              "that there are no obvious deficiencies.\n\n" +
  16.              "C.A.R. Hoare\n\n";
  17. TextArea text = new TextArea(val, 80, 40);
  18. Frame f = new Frame("Demo Frame");
  19. f.setSize(width, height);
  20. f.add("Center", text);
  21. f.show();
  22. } }
  23.